package com.hollowlatte.manage.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author Hollow Latte
 * @since 2021-04-27
 */
public class User implements Serializable {

    private static final long serialVersionUID = 1L;
    /**
     * 学生、教师、管理员的id
     */
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    /**
     * 经MD5加盐值的加密密码
     */
    private String password;

    /**
     * 盐值
     */
    private String salt;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", password=" + password +
                ", salt=" + salt +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                "}";
    }
}
